home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _CF68BEC5EF3F475D83860C328A8F6E4D < prev    next >
Encoding:
Text File  |  2004-03-18  |  1.4 KB  |  67 lines

  1. regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
  2. regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
  3. pshader("
  4.  
  5. ps_2_0
  6.  
  7. def    c3, 5, 1, 0.5, -0.95
  8. def    c4, 20, 1, 0.5, -0.95
  9.  
  10. dcl    t0.xyzw        ; reflection texgen
  11. dcl    t1.xy        ; noise1 uv coords
  12. dcl    t2.xy        ; noise2 uv coords
  13. dcl    t3.xy        ; chmury
  14. dcl    t4.xy        ; lightmap
  15. dcl    t5.xy        ; specular blik
  16.  
  17. dcl_2d        s0    ; reflection map
  18. dcl_2d        s1    ; noise1
  19. dcl_2d        s2    ; noise2
  20. dcl_2d        s3    ; clouds
  21. dcl_2d        s4    ; lightmap
  22. dcl_2d        s5    ; splecular
  23.  
  24.  
  25.     texld    r1, t1, s1    ; noise
  26.     texld    r2, t2, s2    ; noise
  27.     texld    r3, t3, s3    ; clouds
  28.     texld    r4, t4, s4    ; A: terrain lightmap
  29.     texld    r5, t5, s5    ; splecular
  30.  
  31.     mul    r0, r1, r2        ; creating noise
  32.  
  33.     mad    r0, r0, c4.x, t0    ; ???
  34.  
  35.     texldp    r0, r0, s0        ; wykrzywianie
  36.  
  37.  
  38.     sub    r3.a, c4.y, r3.a            ;A: invering clouds opacity = clouds shadow
  39.  
  40.     mul r3.a, r3.a, r4.a            ;A: clouds shadow * static shadows
  41.  
  42.     mad_sat r4.a, r3.a, c7.b, c7.a     ;A: applying ambient
  43.  
  44.  
  45.     mul r3.a, r3.a, r3.a            ;A: clouds shadow * static shadows
  46.     mul    r3.a, r3.a, c5.a            ;A: applying sun visibility to shadows
  47.  
  48.     mul        r5.a, r5.a, r3.a            ;applying shadows to specular
  49.     mul        r5, r5.a, c5            ;daycolor to specular
  50.  
  51.     add_sat        r1.a, r1.a, r2.a
  52.     sub        r1, c4.y, r1.a            ;invert noise
  53.  
  54.     mul        r5, r5, r1            ;applying noise to specular
  55.  
  56.     sub        r0.a, c4.y, r0.a            ;invert noise
  57.  
  58.     mad_sat    r0, r0, r4.a, r5        ;applying shadows and specular to reflection
  59.  
  60.  
  61.     mov oC0, r0
  62.  
  63.  
  64.  
  65. ")
  66.  
  67.